//
//  ViewController.m
//  PictureRotator
//
//  Created by ZJ on 2018/7/30.
//  Copyright © 2018年 iCatch Technology Inc. All rights reserved.
//

#import "ViewController.h"
#import "RotatorView.h"

@interface ViewController () <RotatorViewDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self setupGUI];
}

- (void)setupGUI {
    NSMutableArray *imagesM = [[NSMutableArray alloc] initWithCapacity:5];
    for (int i = 0; i < 5; i++) {
        NSString *imgName = [NSString stringWithFormat:@"img_%02d", i + 1];
        [imagesM addObject:[UIImage imageNamed:imgName]];
    }
    
    RotatorView *view = [[RotatorView alloc] initWithimages:imagesM.copy offsetY:30 height:150];
    [self.view addSubview:view];
    view.delegate = self;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)rotatorViewDidSelected:(RotatorView *)rotatorView pictureIndex:(NSUInteger)index {
    
}

@end
